/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Emmanuel
 */
@Embeddable
public class PostPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idContentIndex")
    private int idContentIndex;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idContentPage")
    private int idContentPage;

    public PostPK() {
    }

    public PostPK(int idContentIndex, int idContentPage) {
        this.idContentIndex = idContentIndex;
        this.idContentPage = idContentPage;
    }

    public int getIdContentIndex() {
        return idContentIndex;
    }

    public void setIdContentIndex(int idContentIndex) {
        this.idContentIndex = idContentIndex;
    }

    public int getIdContentPage() {
        return idContentPage;
    }

    public void setIdContentPage(int idContentPage) {
        this.idContentPage = idContentPage;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idContentIndex;
        hash += (int) idContentPage;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PostPK)) {
            return false;
        }
        PostPK other = (PostPK) object;
        if (this.idContentIndex != other.idContentIndex) {
            return false;
        }
        if (this.idContentPage != other.idContentPage) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.PostPK[ idContentIndex=" + idContentIndex + ", idContentPage=" + idContentPage + " ]";
    }
    
}
